

# 题目：有n阶楼梯，每次可以爬1或2阶，有多少种不同的方法可以爬到楼顶
def climb_ti(n):
    if n==1:
        return 1
    dp = [0] * (n+1)
    dp[1] = 1
    dp[2] = 2
    for i in range(3,n+1):
        dp[i] = dp[i-1] + dp[i-2]
    return dp[n]
print(climb_ti(5))


